<!DOCTYPE html>
<html lang="en">
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="./vue2.js"></script>
    </head>
    <body>
        <div id="app">
            <div >{{name}}</div>
            <div>{{age<18?"未成年":"成年人"}}</div>
            <div>{{name}}</div>

            <h1>表达式</h1>
            <p>{{"李"+name}}</p>
            <p>{{age+1}}</p>
            <p>{{name.split("").reverse().join('')}}</p> 
            <!-- 将jack以空格分割,分割后进行颠倒顺序,在以空格组合  kcaj -->

            <h1>三元运算符</h1>
            <p>{{age>18?"成年人":"未成年人"}}</p>

        </div>
        <script>
            var vm = new Vue({
                el: '#app',
                data: {
                    name:'jack',
                    age:24,
                    gender:"男"
                }
            })
        </script>
    </body>
</html>